package ar.com.temporis.fixture;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 
 * @author matias.sulik
 * 
 */
public class ComplexFixture implements Fixture {

	private Collection<Fixture> fixtures = new ArrayList<Fixture>();

	public void install() {
		for (Fixture fixture : this.fixtures) {
			fixture.install();
		}
	}

	@SuppressWarnings("unchecked")
	public ComplexFixture addFixture(Fixture fixture) {
		this.fixtures.add(fixture);
		return this;
	}

	@SuppressWarnings("unchecked")
	public void setFixtures(Collection fixtures) {
		this.fixtures = fixtures;
	}

	public Collection getFixtures() {
		return fixtures;
	}

}
